package com.yimils.core.common.oss;

import com.aliyun.oss.OSS;
import com.aliyun.oss.model.PutObjectRequest;
import lombok.Data;

import java.io.File;

@Data
public class OssUtils {
    private String accessKey;
    private String accessSecret;
    private String endpoint;
    private String bucketName;
    private OSS ossClient;


    public void uploadQR(String objectName, String fileName) {
        PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, objectName, new File(fileName));
        ossClient.putObject(putObjectRequest);
    }
}
